<!--
 * @Author: your name
 * @Date: 2022-01-04 10:12:02
 * @LastEditTime: 2022-01-04 15:41:39
 * @LastEditors: Please set LastEditors
 * @FilePath: \icps_pcweb\src\views\platform\ICPS\smart\soiltest\flowcomponent\LookDialog.vue
-->
<template>
    <el-dialog v-dialogDrag :visible="visible" title="查看" width="780px" :close-on-click-modal="false" @open="onOpen" @close="onClose">
        <FormatText :config="textConfig" :detail="textDetail" />

        <FormatText :config="textConfig2" :detail="textDetail2" />

        <span slot="footer" class="dialog-footer">
            <el-button class="bottom_all_two" @click="onClose">取 消</el-button>
            <!-- <el-button class="bottom_all" type="primary" @click="onConfirm">确 定</el-button> -->
        </span>
    </el-dialog>
</template>
<script>
import FormatText from '@/components/Template/FormatText.vue'
import { queryResult } from '@/api/inspect'
export default {
    components: {
        FormatText,
    },
    props: {
        config: {
            type: Object,
            default: ()=>{}
        },
        visible: {
            type: Boolean,
            default: false
        }
    },
    data() {
        return {
            textConfig: [
                {label: '站点', field: 'station'},
                {label: '工程名称', field: 'engineeringName'},
                {label: '产品名', field: 'product'},
                {label: '车牌号', field: 'carNo'},
            ],
            textDetail: {},
            textConfig2: [
                {label: '构件尺寸', field: 'sizeValue'},
                {label: '坍落度', field: 'slump'},
                {label: '扩展性', field: 'expansibility'},
                {label: '和易性评价', field: 'workabilityEvaluation'},
                {label: '和易性描述', field: 'workabilityDescribe'},
                {label: '3天抗压', field: 'threeCompression'},
                {label: '7天抗压', field: 'sevenCompression'},
                {label: '14天抗压', field: 'fourteenCompression'},
                {label: '28天抗压', field: 'twentyEightcompression'},
                {label: '60天抗压', field: 'sixtycompression'},
                {label: '备注', field: 'remark'},
            ],
            textDetail2: {},
        }
    },
    methods: {
        onOpen() {
            this.textDetail = this.config // 表单数据基本数据来源
            queryResult({pid: this.config.id}).then(res=>{
                if(res && res.code === 1001) {
                    this.textDetail2 = res.data // 检验数据
                }
            })
        },
        onClose() {
            this.$emit('update:visible', false)
        }

    }
}
</script>
<style lang="scss" scoped></style>



